package Dao;

import Model.CSVReport.CSVUtils;
import Model.OrcUtils.JDBCUtils;

import java.util.List;

public class CSVDao {
    public static boolean createCSV(String path,String sql){
        List<String> headlist = JDBCUtils.getHead(sql);
        String[] head = headlist.toArray(new String[headlist.size()]);
        List<String[]> datalist = JDBCUtils.getDataList(sql);
        boolean isSucess = CSVUtils.CSVCreate(path,head,datalist);
        return isSucess;
    }
}
